import Vue from 'vue'
import Router from 'vue-router'
import Login from '../pages/login/login'
import Register from "../pages/login/register";
import FindPassword from "../pages/login/findPassword";
import Home from "../pages/home";
import Mine from "../pages/mine/center";
import Movie from "../pages/movie/index";
import Modify from "../pages/mine/modify";
import Detail from "../pages/movie/detail";
import Music from "../pages/music/index";
import Result from "../components/searchResult"
import movFav from '../pages/mine/mymov/fav'
import MainSearch from "../components/MainSearch";
import MoreMusicList from "../pages/music/MoreMusicList";
import MusicListDetail from "../pages/music/Player/MusicListDetail";
import ArtistIndex from "../pages/music/Player/ArtistIndex";
import artistDetail from "../pages/music/Player/artistDetail";
import MusicDetail from "../pages/music/Player/MusicDetail";
import Com from "../pages/mine/mymov/Com";
import MusCom from "../pages/mine/myMus/MusCom";
import MusLike from "../pages/mine/myMus/MusLike";
import MusFList from "../pages/mine/myMus/MusFList";
import index from "../pages/admin/home";
import Alogin from "../pages/admin/Alogin";
import banner from "../pages/admin/home/banner";
import news from "../pages/admin/home/news";
import welcome from "../pages/admin/welcome";
import Ausers from "../pages/admin/users/user"
import AMovFav from "../pages/admin/movie/AFav"
import ASongLike from "../pages/admin/music/ASongLike";
import AMusCom from "../pages/admin/music/AMusCom";
import AMovCom from "../pages/admin/movie/AMovCom";
import admininfo from "../pages/admin/admininfo";
Vue.use(Router)
export default new Router({
  routes: [
    {path: '/',redirect:'/home'},
    {
      path: '/login',
      name: 'login',
      component: Login
    },
    {
      path: '/register',
      name: 'register',
      component: Register
    },
    {
      path: '/findPassword',
      name: 'findPassword',
      component: FindPassword
    },
    {
      path: '/home',
      name: 'home',
      component: Home
    },
    {
      path: '/mine',
      name: 'mine',
      component: Mine
    },
    {
      path: '/movie',
      name: 'movie',component: Movie
    },
    {path: '/modify',name: 'modify',component: Modify},
    {path: '/detail/:id',name: 'detail',component: Detail},
    {path: '/music',name: 'music',component: Music},
    {path: '/result',name: 'result',component: Result},
    {path: '/movFav',name: 'movFav',component: movFav},
    {path: '/movCom',name: 'movCom',component: Com},
    {path: '/mainSearch',name: 'mainSearch',component: MainSearch},
    {path: '/MoreMusicList',name:'MoreMusicList',component: MoreMusicList},
    {path:'/MusicListDetail/:id',name:'MusicListDetail',component:MusicListDetail},
    {path: '/ArtistIndex',name: 'ArtistIndex',component: ArtistIndex},
    {path: '/artistDetail/:id',name: 'artistDetail',component: artistDetail},
    {path: '/MusicDetail/:id',name: 'MusicDetail',component: MusicDetail},
    {path: '/MusCom',name: 'MusCom',component: MusCom},
    {path: '/MusLike',name: 'MusLike',component: MusLike},
    {path: '/MusFList',name: 'MusFList',component: MusFList},

//管理员
    {
      path: '/admin',
      name: 'Alogin',
      component: Alogin
    },
    {
      path: '/admin/index',
      name: 'index',
      component: index,
      redirect: '/welcome',
      children:[
        {path:'/adminInfo',component:admininfo},
        {path:'/welcome',name:welcome,component:welcome},
        {path:'/banner',component:banner},
        {path:'/news',component:news},
        {path:'/users',component:Ausers},
        {path:'/AMovFav',component:AMovFav},
        {path:'/AMovCom',component:AMovCom},
        {path:'/AMusCom',component:AMusCom},
        {path: '/ASongLike',component: ASongLike},
      ]
    }

  ]
})
